package com.gezhi.clsserver.clsmag.service;

import com.gezhi.clsserver.bean.ClassBean;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;

/**
 * 班级业务功能接口
 *
 * @author AWG
 */
@Transactional(readOnly = true)
public interface IClassService {

	/**
	 * 新增班级
	 *
	 * @param classBean 班级对象
	 */
	@Transactional(readOnly = false,propagation = Propagation.REQUIRED,isolation = Isolation.REPEATABLE_READ,rollbackFor = Exception.class)
	void saveClass(ClassBean classBean);

	/**
	 * 修改班级
	 *
	 * @param classBean 班级对象
	 */
	@Transactional(readOnly = false,propagation = Propagation.REQUIRED,isolation = Isolation.REPEATABLE_READ,rollbackFor = Exception.class)
	void updateClass(ClassBean classBean);

	/**
	 * 删除班级
	 *
	 * @param classBean 班级对象
	 */
	@Transactional(readOnly = false,propagation = Propagation.REQUIRED,isolation = Isolation.REPEATABLE_READ,rollbackFor = Exception.class)
	void deleteClass(ClassBean classBean);

	/**
	 * 根据班级ID查询班级
	 *
	 * @param id 班级ID
	 * @return 班级对象
	 */
	ClassBean getClassById(Integer id);

	/**
	 * 查询所有的班级
	 *
	 * @return 所有的班级组成的List集合
	 */
	List<ClassBean> findAllClass();

}
